package date_layer;
public class Coordinator
{
	private Cake cake;
	private Cakes cakes;
	private Client client;
	private Clients clients;
	private Ingredient ingredient;
	private Ingredients ingredients;
	private Provisioner provisioner;
	private Provisioners provisioners;
	private Sale sale;
	private Sales sales;
	private Seller seller;
	private Sellers sellers;

	
	public Coordinator ()
	{

	}

	public String  showInfo ()
	{
		return "";
	}

	public String  manageCake (int accion,String name, String recipe, String type, Ingredients ingredients)
	{
		if (accion == 1)
		{
			cake = new Cake (name, recipe, type, ingredients);
			// ojo
			System.out.println("SAVE");
			return "";
		}
		else
		{
			// ojo
			System.out.println("SERCH");
			return "";
		}
	}
	
	public String  manageClient (int accion, String name, String id)
	{
		if (accion == 1)
		{
			client = new Client (name, id);			
			// ojo
			System.out.println("SAVE");
			return "";
		}
		else
		{
			// ojo
			System.out.println("SERCH");
			return "";
		}
	}
	
	public String  manageIngredient (int accion, String name, Provisioner provisioner, String description)
	{
		if (accion == 1)
		{
			ingredient = new Ingredient (name, provisioner, description);
			// ojo
			System.out.println("SAVE");
			return "";
		}
		else
		{
			// ojo
			System.out.println("SERCH");
			return "";
		}
	}

	public String  manageProvisioner (int accion, String name, String tel, String direction, int grade)
	{
		if (accion == 1)
		{
			provisioner = new Provisioner (name, tel, direction, grade );
			// ojo
			System.out.println("SAVE");
			return "";
		}
		else
		{
			// ojo
			System.out.println("SERCH");
			return "";
		}
	}
	
	public String  manageSale (int accion, int bill, Client client, Seller seller, Cakes products)
	{
		//ojo
		
		if (accion == 1)
		{
			sale = new Sale (bill,"", "", client, seller, products);
			sale.getBill();

			// ojo
			System.out.println("SAVE");
			return "";
		}
		else
		{
			// ojo
			System.out.println("SERCH");
			return "";
		}
	}
	
	public String  manageSeller (int accion, String name, String id, String position)
	{
		
		if (accion == 1)
		{
			seller = new Seller (name, id, position);
			System.out.println(seller.getName());
			System.out.println(seller.getId());
			// ojo
			System.out.println("SAVE");
			return "";
		}
		else
		{
			// ojo
			System.out.println("SERCH");
			return "";
		}
	}

	public Cake getCake() 
	{
		return cake;
	}

	public void setCake(Cake cake) 
	{
		this.cake = cake;
	}

	public Cakes getCakes() 
	{
		return cakes;
	}

	public void setCakes(Cakes cakes) 
	{
		this.cakes = cakes;
	}

	public Client getClient() 
	{
		return client;
	}

	public void setClient(Client client) 
	{
		this.client = client;
	}

	public Clients getClients() 
	{
		return clients;
	}

	public void setClients(Clients clients) 
	{
		this.clients = clients;
	}

	public Ingredient getIngredient() 
	{
		return ingredient;
	}

	public void setIngredient(Ingredient ingredient) 
	{
		this.ingredient = ingredient;
	}

	public Ingredients getIngredients() 
	{
		return ingredients;
	}

	public void setIngredients(Ingredients ingredients)
	{
		this.ingredients = ingredients;
	}

	public Provisioner getProvisioner() 
	{
		return provisioner;
	}

	public void setProvisioner(Provisioner provisioner) 
	{
		this.provisioner = provisioner;
	}

	public Provisioners getProvisioners() 
	{
		return provisioners;
	}

	public void setProvisioners(Provisioners provisioners) 
	{
		this.provisioners = provisioners;
	}

	public Sale getSale()
	{
		return sale;
	}

	public void setSale(Sale sale)
	{
		this.sale = sale;
	}

	public Sales getSales() 
	{
		return sales;
	}

	public void setSales(Sales sales)
	{
		this.sales = sales;
	}

	public Seller getSeller()
	{
		return seller;
	}

	public void setSeller(Seller seller) 
	{
		this.seller = seller;
	}

	public Sellers getSellers() 
	{
		return sellers;
	}

	public void setSellers(Sellers sellers) 
	{
		this.sellers = sellers;
	}




}
